package com.ruoyi.demo.controller;

/**
 * @author wxx
 * @description
 *
 */


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.demo.service.StatisticalAnalysisDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


import java.util.Map;

/**
 * @author wxx
 * @description
 * @date
 *
 *
 */
@RequestMapping("/Analysis/demo")
@RestController
public class StatisticalAnalysisDemoController extends BaseController {

    @Autowired
    private StatisticalAnalysisDemoService statisticalAnalysisService;

    // 对接极云 报警数据接收

    @RequestMapping(value = "/getdata", method = {RequestMethod.GET, RequestMethod.POST})
    public AjaxResult InboundDataOftAlarm(@RequestBody(required = false) Map map) {

        int row = statisticalAnalysisService.InboundDataOftAlarm(map);

        if (row>0){
            return AjaxResult.success("入库成功");
        }else {
            return AjaxResult.error("入库失败");

        }

    }


}
